<table cellpadding="6" cellspacing="1"  border="0" class="myTable">

<tr>
  <th style="width:40%">สินค้า</th>
  <th style="text-align:right;width:10%">ราคาต่อหน่วย</th>
  <th style="text-align:center;width:10%">หน่วย</th>
  <th style="text-align:center;width:20%">จำนวน</th>
  
  
  <th style="text-align:right;width:10%">ราคารวม</th>
</tr>

<?php $i = 1; ?>

<?php foreach ($this->cart->contents() as $items): ?>

	<?
	$option = $this->cart->product_options($items['rowid']);
	
	$option = (array)$option;
	$pID = $option['MATNR'];
	$pName = $option['MAKTX'];
	$baseUnit = $option['BASE_UNIT'];
	if($baseUnit=="KAR"){
		$b = "ลัง";
	}else if($baseUnit=="PAK"){
		$b = "แพ็ก";
	}else {
		$b = "ชิ้น";
	}
	?>

	<tr>
	  <td style="width:40%"><?php echo $pID ?><br />
		<?php echo $pName ?></td>
		 <td style="text-align:right;width:60px">
	  	<div style="width:60px;float:right;float:right;"><?php echo $this->cart->format_number($items['price']); ?></div>
	  </td>
		<td style="width:20%;text-align: center;"><?php echo $b ?></td>
		<td style="width:10%;text-align: right;"><?php echo converUnit($items,$option);?></td>
	 
	 
	  <td style="text-align:right;width:90px">
	  	<div style="width:90px;float:right;"><?php echo $this->cart->format_number($items['subtotal']); ?></div>
	  </td>
	</tr>

<?php $i++; ?>

<?php endforeach; ?>

<tr>
  <td colspan="3"> </td>
  <td class="right"><strong>ราคารวม</strong></td>
  <td class="right" style="text-align: right"><?php echo $this->cart->format_number($this->cart->total()); ?></td>
</tr>

</table>
<br />
<a href="<?php echo base_url()?>order/editorder/<?php echo $orderID?>">แก้ไขรายการสั่งซื้อ</a> | 
<a href="<?php echo base_url()?>order/addpromotion/">เลือกโปรโมชั่น</a>